<template>
  <van-swipe class="banner" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(item, index) in props.swiperData" :key="item.id">
      <img :src="require(`@/assets/img/${img[index]}`)" :title="item.title"/>
    </van-swipe-item>
  </van-swipe>
</template>

<script lang="ts" setup>
import { ref, defineProps } from 'vue'

const props = defineProps(['swiperData'])
const img = ref(['1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png', '8.png', '9.png', '10.png'])
</script>

<style scoped>
.banner{
    width: 100%;
    height: 160px;
    img{
        width: 100%;
        height: 100%;
    }
}
</style>
